linux | 您所在的位置:网站首页 › centos7 zsh › linux |
0
分享至
用微信扫码二维码 分享至好友和朋友圈 前言 一般Linux系统都是默认bash shell,但是zsh也很强大哦! 优点: zsh可以兼容bash 的语法 zsh强大的tab补全功能,例如:在bash中 sudo ch... 在这里按tab键不会给你补全的建议,而zsh就可以做到 zsh还可以做到命令参数补全 bash中可以使用cd - 切换到最后一次访问的目录,zsh可以使用 cd -2 , cd -3..... 来切换到倒数第二,第三个最近访问目录 大小写字母自动更正,如果文件名大小写输入错了,按tab键会进行更正 zsh有很多很酷炫的主题 …… 安装安装zsh zsh在不同的发行版本都会有自带的包,可以直接用包管理器直接安装. 例如: Centos6/Centos7/Fedora: sudo yum -y install zsh#或者sudo dnf install zshDebian/Ubuntu/Deepin: sudo apt update && sudo apt install zshArchlinux/Manjaro: sudo pacman -S zsh安装oh-my-zsh github上面就有提供安装,直接通过网络安装下载安装就可以了(需要有安装git) sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"安装powerline主题 git clone https://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme.git ~/.ohmyzsh-powerlinecd ~/.ohmyzsh-powerline./install_in_omz.sh修改zsh主题 sed -i 's/^ZSH_THEME=.*/ZSH_THEME="powerline"/g' ~/.zshrc添加字体 如果不添加字体会出现乱码(小方块) cdgit clone https://github.com/powerline/fonts.gitcd fonts./install.sh修改默认shell 一打开终端就直接进入zsh,而不是默认的bash chsh -s `which zsh `(这里需要输入密码,除非是root用户) 总结 这只是开始,安装完体验体验。 操作系统就是工具,不要太枯燥了,偶尔找些乐趣玩玩,就没什么学不下去的,放松放松。 特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。 Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services. /阅读下一篇/ 返回网易首页 下载网易新闻客户端 |
CopyRight 2018-2019 实验室设备网 版权所有 |